include "BaseService.thrift"

namespace cpp user
namespace java me.vzhi.core.user

struct UserBaseInfo {
	1: required i64 user_id;
	2: optional i32 live_city;
	3: optional i32 age;
	4: optional i32 gender;
	5: optional string nick_name;
	6: optional string real_name;
	7: optional string photo_url;
	//0: 求职，1: 招聘
	8: optional i32 identity_statu;
	//json 格式， 用于标识客户端信息
	9: optional string token;
} 

struct UserEducateInfo {
	1: required i64 user_id;
	2: optional i32 school_code;
	3: optional string school_name;
	4: optional i32 degree_code;
	5: optional i32 major_code;
	6: optional string major_name;
	7: optional string photo_url;
	8: optional i64 from_date;
	9: optional i64 end_date;
	10: optional bool is_recently_experience;
	11: optional i64 key_id;
} 

struct UserWorkExpInfo {
	1: required i64 user_id;
	2: optional i32 company_code;
	3: optional string company_name;
	4: optional i32 position_code;
	5: optional string position_name;
	6: optional i64 from_date;
	7: optional i64 end_date;
	8: optional bool is_recently_experience;
	9: optional string job_desc;
	10: optional i32 monthly_salary;
	11: optional i64 key_id;
}

service UserService{
	UserBaseInfo getUserBasicInfo(1:i64 user_id);
	bool setUserBasicInfo(1:UserBaseInfo info);
	string getUserToken(1:i64 user_id);
	i32 createUserEducation(1:UserEducateInfo info);
	bool updateUserEducation(1:i32 item_id, 2:UserEducateInfo info);
	UserEducateInfo getUserLastEdu(1:i64 user_id);
	list<UserEducateInfo> getUserEduList(1:i64 user_id);
	i32 createUserWorkExpirence(1:UserWorkExpInfo info);
	bool updateUserWorkExpirence(1:i32 item_id, 2:UserWorkExpInfo info);
	UserWorkExpInfo getUserWorkLastExp(1:i64 user_id);
	list<UserWorkExpInfo> getUserWorkExpList(1:i64 user_id);
}
